package cate.game.play.proce.round;

import cate.common.table.d.GDFight;
import cate.game.play.proce.stat.StatBase;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

import java.util.ArrayList;
import java.util.List;

@NoteClass("一个回合中的统计数据")
public class RoundStat extends StatBase {

	@NoteField("A方正常行动过的人")
	public List<Integer> pidListA = new ArrayList<>();

	@NoteField("B方正常行动过的人")
	public List<Integer> pidListB = new ArrayList<>();

	public void recordPid(byte team, int pid){
		getPidList(team).add(pid);
	}

	public int getCurTeamOrder(byte team) {
		return getPidList(team).size() + 1;
	}

	private List<Integer> getPidList(byte team) {
		if (team == GDFight.Team.A) {
			return pidListA;
		} else {
			return pidListB;
		}
	}
}
